#pragma once
#include"RBTree.h"

namespace wzy{
	template<class T>
	class set {
		struct KeyOfT
		{
			const T& operator()(const T& key)
			{
				return key;
			}
		};

	public:
		typedef typename RBTree<T, const T, KeyOfT>::Iterator iterator;
		typedef typename RBTree<T, const T, KeyOfT>::ConstIterator const_iterator;

		iterator begin()
		{
			return _t.Begin();
		}

		iterator end()
		{
			return _t.End();
		}

		const_iterator begin() const
		{
			return _t.Begin();
		}

		const_iterator end() const
		{
			return _t.End();
		}


		pair<iterator,bool> insert(const T& data)
		{
			return _t.Insert(data);
		}
		
		void InOrder()
		{
			_t.InOrder();
		}

	private:
		RBTree<T, const T, KeyOfT> _t;
	};
}